<?php

namespace app\fuck\controller;

use cmf\controller\BaseController;
use think\Db;

class TestController extends BaseController
{

    public function test1()
    {
        /*
        $zg = [48,47,46,45,44,43,2,234,236,232,227,86,183,224,241,242,254,256,247,255,248,264,267,258];  //所有主管
        $w1 = implode(",",$zg);
        Db::name('role_user')->where("user_id in ($w1)")->delete();

        foreach ($zg as $k=>$v){
            $data = [
                'user_id' => $v,
                'role_id' => 3
            ];
            Db::name('role_user')->insertGetId($data);
            $data = [
                'user_id' => $v,
                'role_id' => 4
            ];
            Db::name('role_user')->insertGetId($data);
        }
            */

        /*$jl = [164,18,197,167,202,14,161,209,194,148,185,159,166,198,89,153,154,204,205,199,145,156];   //所有经理
        $w2 = implode(",",$jl);
        Db::name('role_user')->where("user_id in ($w2)")->delete();

        foreach ($jl as $k2=>$v2){
            $data = [
                'user_id' => $v2,
                'role_id' => 9              //经理角色是9
            ];
            Db::name('role_user')->insertGetId($data);
            $data = [
                'user_id' => $v2,
                'role_id' => 8              //销售角色是8
            ];
            Db::name('role_user')->insertGetId($data);
        }
            */

        return $this->fetch();
    }


}
